3.25 \(\int \csc ^2(e+f x) (a+b \sec ^2(e+f x))^2 \, dx\)

Optimal. Leaf size=50 \[ \frac {2 b (a+b) \tan (e+f x)}{f}-\frac {(a+b)^2 \cot (e+f x)}{f}+\frac {b^2 \tan ^3(e+f x)}{3 f} \]

[Out]

-(a+b)^2*cot(f*x+e)/f+2*b*(a+b)*tan(f*x+e)/f+1/3*b^2*tan(f*x+e)^3/f

________________________________________________________________________________________

Rubi [A]  time = 0.06, antiderivative size = 50, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, integrand size = 23, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.087, Rules used = {4132, 270} \[ \frac {2 b (a+b) \tan (e+f x)}{f}-\frac {(a+b)^2 \cot (e+f x)}{f}+\frac {b^2 \tan ^3(e+f x)}{3 f} \]

Antiderivative was successfully verified.

[In]

Int[Csc[e + f*x]^2*(a + b*Sec[e + f*x]^2)^2,x]

[Out]

-(((a + b)^2*Cot[e + f*x])/f) + (2*b*(a + b)*Tan[e + f*x])/f + (b^2*Tan[e + f*x]^3)/(3*f)

Rule 270

Int[((c_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_.), x_Symbol] :> Int[ExpandIntegrand[(c*x)^m*(a + b*x^n)^p,
 x], x] /; FreeQ[{a, b, c, m, n}, x] && IGtQ[p, 0]

Rule 4132

Int[((a_) + (b_.)*sec[(e_.) + (f_.)*(x_)]^(n_))^(p_.)*sin[(e_.) + (f_.)*(x_)]^(m_), x_Symbol] :> With[{ff = Fr
eeFactors[Tan[e + f*x], x]}, Dist[ff^(m + 1)/f, Subst[Int[(x^m*ExpandToSum[a + b*(1 + ff^2*x^2)^(n/2), x]^p)/(
1 + ff^2*x^2)^(m/2 + 1), x], x, Tan[e + f*x]/ff], x]] /; FreeQ[{a, b, e, f, p}, x] && IntegerQ[m/2] && Integer
Q[n/2]

Rubi steps

\begin {align*} \int \csc ^2(e+f x) \left (a+b \sec ^2(e+f x)\right )^2 \, dx &=\frac {\operatorname {Subst}\left (\int \frac {\left (a+b+b x^2\right )^2}{x^2} \, dx,x,\tan (e+f x)\right )}{f}\\ &=\frac {\operatorname {Subst}\left (\int \left (2 b (a+b)+\frac {(a+b)^2}{x^2}+b^2 x^2\right ) \, dx,x,\tan (e+f x)\right )}{f}\\ &=-\frac {(a+b)^2 \cot (e+f x)}{f}+\frac {2 b (a+b) \tan (e+f x)}{f}+\frac {b^2 \tan ^3(e+f x)}{3 f}\\ \end {align*}

________________________________________________________________________________________

Mathematica [B]  time = 1.14, size = 109, normalized size = 2.18 \[ \frac {4 \sec ^3(e+f x) \left (a \cos ^2(e+f x)+b\right )^2 \left (\sin (f x) \cos ^2(e+f x) \left (3 (a+b)^2 \csc (e) \cot (e+f x)+b (6 a+5 b) \sec (e)\right )+b^2 \tan (e) \cos (e+f x)+b^2 \sec (e) \sin (f x)\right )}{3 f (a \cos (2 (e+f x))+a+2 b)^2} \]

Antiderivative was successfully verified.

[In]

Integrate[Csc[e + f*x]^2*(a + b*Sec[e + f*x]^2)^2,x]

[Out]

(4*(b + a*Cos[e + f*x]^2)^2*Sec[e + f*x]^3*(b^2*Sec[e]*Sin[f*x] + Cos[e + f*x]^2*(3*(a + b)^2*Cot[e + f*x]*Csc
[e] + b*(6*a + 5*b)*Sec[e])*Sin[f*x] + b^2*Cos[e + f*x]*Tan[e]))/(3*f*(a + 2*b + a*Cos[2*(e + f*x)])^2)

________________________________________________________________________________________

fricas [A]  time = 0.62, size = 71, normalized size = 1.42 \[ -\frac {{\left (3 \, a^{2} + 12 \, a b + 8 \, b^{2}\right )} \cos \left (f x + e\right )^{4} - 2 \, {\left (3 \, a b + 2 \, b^{2}\right )} \cos \left (f x + e\right )^{2} - b^{2}}{3 \, f \cos \left (f x + e\right )^{3} \sin \left (f x + e\right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(f*x+e)^2*(a+b*sec(f*x+e)^2)^2,x, algorithm="fricas")

[Out]

-1/3*((3*a^2 + 12*a*b + 8*b^2)*cos(f*x + e)^4 - 2*(3*a*b + 2*b^2)*cos(f*x + e)^2 - b^2)/(f*cos(f*x + e)^3*sin(
f*x + e))

________________________________________________________________________________________

giac [A]  time = 0.31, size = 64, normalized size = 1.28 \[ \frac {b^{2} \tan \left (f x + e\right )^{3} + 6 \, a b \tan \left (f x + e\right ) + 6 \, b^{2} \tan \left (f x + e\right ) - \frac {3 \, {\left (a^{2} + 2 \, a b + b^{2}\right )}}{\tan \left (f x + e\right )}}{3 \, f} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(f*x+e)^2*(a+b*sec(f*x+e)^2)^2,x, algorithm="giac")

[Out]

1/3*(b^2*tan(f*x + e)^3 + 6*a*b*tan(f*x + e) + 6*b^2*tan(f*x + e) - 3*(a^2 + 2*a*b + b^2)/tan(f*x + e))/f

________________________________________________________________________________________

maple [A]  time = 0.90, size = 96, normalized size = 1.92 \[ \frac {-a^{2} \cot \left (f x +e \right )+2 a b \left (\frac {1}{\sin \left (f x +e \right ) \cos \left (f x +e \right )}-2 \cot \left (f x +e \right )\right )+b^{2} \left (\frac {1}{3 \sin \left (f x +e \right ) \cos \left (f x +e \right )^{3}}+\frac {4}{3 \sin \left (f x +e \right ) \cos \left (f x +e \right )}-\frac {8 \cot \left (f x +e \right )}{3}\right )}{f} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(csc(f*x+e)^2*(a+b*sec(f*x+e)^2)^2,x)

[Out]

1/f*(-a^2*cot(f*x+e)+2*a*b*(1/sin(f*x+e)/cos(f*x+e)-2*cot(f*x+e))+b^2*(1/3/sin(f*x+e)/cos(f*x+e)^3+4/3/sin(f*x
+e)/cos(f*x+e)-8/3*cot(f*x+e)))

________________________________________________________________________________________

maxima [A]  time = 0.36, size = 54, normalized size = 1.08 \[ \frac {b^{2} \tan \left (f x + e\right )^{3} + 6 \, {\left (a b + b^{2}\right )} \tan \left (f x + e\right ) - \frac {3 \, {\left (a^{2} + 2 \, a b + b^{2}\right )}}{\tan \left (f x + e\right )}}{3 \, f} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(f*x+e)^2*(a+b*sec(f*x+e)^2)^2,x, algorithm="maxima")

[Out]

1/3*(b^2*tan(f*x + e)^3 + 6*(a*b + b^2)*tan(f*x + e) - 3*(a^2 + 2*a*b + b^2)/tan(f*x + e))/f

________________________________________________________________________________________

mupad [B]  time = 4.40, size = 56, normalized size = 1.12 \[ \frac {b^2\,{\mathrm {tan}\left (e+f\,x\right )}^3}{3\,f}-\frac {a^2+2\,a\,b+b^2}{f\,\mathrm {tan}\left (e+f\,x\right )}+\frac {2\,b\,\mathrm {tan}\left (e+f\,x\right )\,\left (a+b\right )}{f} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a + b/cos(e + f*x)^2)^2/sin(e + f*x)^2,x)

[Out]

(b^2*tan(e + f*x)^3)/(3*f) - (2*a*b + a^2 + b^2)/(f*tan(e + f*x)) + (2*b*tan(e + f*x)*(a + b))/f

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \left (a + b \sec ^{2}{\left (e + f x \right )}\right )^{2} \csc ^{2}{\left (e + f x \right )}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(f*x+e)**2*(a+b*sec(f*x+e)**2)**2,x)

[Out]

Integral((a + b*sec(e + f*x)**2)**2*csc(e + f*x)**2, x)

________________________________________________________________________________________